from app import app
import click
from exts import db


@app.cli.command()
@click.option('--drop', default=False)
def createdb(drop=False):
    if drop:
        click.confirm('Drop all the data?', default=False, abort=True)
        db.drop_all()
        click.echo('You have drop the data')
    db.create_all()
    click.echo('database inited!')
